package com.campus.util;

/**
 * 分页Model类
 *
 * @author Alaskaboo
 * @since 2022-10-23 14:42:37
 */
public class PageBean {


    private int currentPage; // 第几页
    private int pageSize; // 每页记录数
    private int start;  // 起始页
    private String query; // 查询参数

    public PageBean() {
    }

    public PageBean(int currentPage, int pageSize, String query) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.query = query;
    }

    public PageBean(int currentPage, int pageSize) {
        super();
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public int getPageNum() {
        return currentPage;
    }

    public void setPageNum(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getStart() {
        return (currentPage - 1) * pageSize;
    }

    public String getQuery() {
        return query;
    }

    public void setQuery(String query) {
        this.query = query;
    }
}
